/*
 * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @Date: 2023-05-04 23:14:25
 * @LastEditors: zt 2993721164@qq.com
 * @LastEditTime: 2025-08-02 16:53:39
 * @FilePath: /yyshort/lib/common/widgets/app.dart
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:yyshort/common/style/theme.dart';
import 'package:yyshort/common/values/values.dart';

/// 透明背景 AppBar
AppBar transparentAppBar({
  Widget? title,
  Widget? leading,
  List<Widget>? actions,
}) {
  return AppBar(
    // backgroundColor: Colors.red, // 先使用这个测试
    backgroundColor: AppTheme.light.appBarTheme.backgroundColor,
    elevation: 0,
    title: title != null
        ? Container(alignment: Alignment.centerLeft, child: title)
        : null,
    leading: leading,
    actions: actions,
  );
}

/// 10像素 Divider
Widget divider10Px({Color bgColor = AppColors.secondaryElement}) {
  return Container(
    height: 10.w,
    decoration: BoxDecoration(color: bgColor),
  );
}
